package com.zcb.agrimarket.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 维修记录表
 * @TableName repair_log
 */
@TableName(value ="repair_log")
@Data
public class RepairLog implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     *  维修状态 0-未维修 1-已维修 2-维修中
     */
    @TableField(value = "state")
    private Integer state;

    /**
     * 报修教师
     */
    @TableField(value = "teacher_id")
    private Long teacherId;

    /**
     * 教师姓名
     */
    @TableField(value = "teacher_name")
    private String teacherName;

    /**
     * 实验室id
     */
    @TableField(value = "lab_id")
    private Long labId;

    /**
     * 实验室名
     */
    @TableField(value = "lab_name")
    private String labName;

    /**
     * 实验员id
     */
    @TableField(value = "experimenter_id")
    private Long experimenterId;

    /**
     * 实验员姓名
     */
    @TableField(value = "experimenter_name")
    private String experimenterName;

    /**
     * 故障描述
     */
    @TableField(value = "problem")
    private String problem;

    /**
     * 维修情况说明
     */
    @TableField(value = "repair_description")
    private String repairDescription;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 逻辑删除 0-正常 1-已删除
     */
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        RepairLog other = (RepairLog) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
                && (this.getTeacherId() == null ? other.getTeacherId() == null : this.getTeacherId().equals(other.getTeacherId()))
                && (this.getTeacherName() == null ? other.getTeacherName() == null : this.getTeacherName().equals(other.getTeacherName()))
                && (this.getLabId() == null ? other.getLabId() == null : this.getLabId().equals(other.getLabId()))
                && (this.getLabName() == null ? other.getLabName() == null : this.getLabName().equals(other.getLabName()))
                && (this.getExperimenterId() == null ? other.getExperimenterId() == null : this.getExperimenterId().equals(other.getExperimenterId()))
                && (this.getExperimenterName() == null ? other.getExperimenterName() == null : this.getExperimenterName().equals(other.getExperimenterName()))
                && (this.getProblem() == null ? other.getProblem() == null : this.getProblem().equals(other.getProblem()))
                && (this.getRepairDescription() == null ? other.getRepairDescription() == null : this.getRepairDescription().equals(other.getRepairDescription()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
                && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
                && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getTeacherId() == null) ? 0 : getTeacherId().hashCode());
        result = prime * result + ((getTeacherName() == null) ? 0 : getTeacherName().hashCode());
        result = prime * result + ((getLabId() == null) ? 0 : getLabId().hashCode());
        result = prime * result + ((getLabName() == null) ? 0 : getLabName().hashCode());
        result = prime * result + ((getExperimenterId() == null) ? 0 : getExperimenterId().hashCode());
        result = prime * result + ((getExperimenterName() == null) ? 0 : getExperimenterName().hashCode());
        result = prime * result + ((getProblem() == null) ? 0 : getProblem().hashCode());
        result = prime * result + ((getRepairDescription() == null) ? 0 : getRepairDescription().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", state=").append(state);
        sb.append(", teacherId=").append(teacherId);
        sb.append(", teacherName=").append(teacherName);
        sb.append(", labId=").append(labId);
        sb.append(", labName=").append(labName);
        sb.append(", experimenterId=").append(experimenterId);
        sb.append(", experimenterName=").append(experimenterName);
        sb.append(", problem=").append(problem);
        sb.append(", repairDescription=").append(repairDescription);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}